package org.fhawk.microservice.produce.service.impl;

import org.fhawk.microservice.produce.service.ProduceService;
import org.springframework.beans.factory.annotation.Autowired;

import javax.sql.XAConnection;
import javax.sql.XADataSource;
import javax.transaction.xa.XAResource;
import java.sql.SQLException;

public class ProduceServiceImpl implements ProduceService {
    @Autowired
    XADataSource dataSource;

    @Override
    public void add(String name) {
        try {
            XAConnection connection = dataSource.getXAConnection();
            XAResource resource = connection.getXAResource();
        } catch (SQLException e) {
            e.printStackTrace();
        }


    }
}
